**
** Represents a view into another object.
** Updates to the underlying object will be reflected in the view.
** If the view is writable, then writes will change the underlying object.
**
mixin View {

	**
	** The object of the view.
	**
	abstract Obj obj()

	// TODO isRO, isRW?

}

**
** Just a helper class to make Views of Mats easier.
**
** TODO Could have been MatView ...
**
abstract class ViewMat: Mat, View {

	override Mat obj {
		set {
			if (val.of != of) {
				throw Err("bad of: ${val.of} != $of")
			}
			validateObj(val);
			// TODO Yes this line-carry-over expecting mult is lame.
			*obj = val
		}
	}

	override Type of() {
		obj.of
	}

	internal abstract Void validateObj(Mat proposed)

}
